<template>
	<view class="row-box">
		<view class="foot_size">
			{{title}}
		</view>
		<view v-for="(item,index) in assessmentList" :key="index" class="Item" @click="changeActive(index)">
			<image :src="activeIndex == index?$IMG_URL('/static/test/radiotrue.png'):$IMG_URL('/static/test/radiofalse.png')" mode="aspectFill" class="img"></image>
			<text class="text">
				{{item}}
			</text>
		</view>
	</view>
</template>

<script>
	export default{
		props: {
			title:{
				type:String,
				default: '',
				required: true
			}
		},
		data(){
			return{
				activeIndex:0,
				assessmentList:[
					'正常',
					'缺乏',
					'过量'
				]
			}
		},
		methods:{
			changeActive(index){
				this.activeIndex = index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.row-box{
		width: 654rpx;
		height: 64rpx;
		background: #f9f9f9;
		border-radius: 8rpx;
		padding: 0 20rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-bottom: 16rpx;
		.foot_size{
			flex: 1;
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC-Medium;
			font-weight: 500;
			text-align: left;
			color: #000000;
		}
		.Item {
			display: flex;
			flex-direction: row;
			align-items: center;
			margin-left: 32rpx;
		
			.img {
				width: 36rpx;
				height: 36rpx;
				margin-right: 12rpx;
			}
		
			.text {
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Regular;
				font-weight: 400;
				text-align: left;
				color: #000000;
			}
		}
	}
</style>